import { IActionResult, IContext, IParam } from '../../common';
import { IAbility } from '../common';
import { IViewLogicInput } from './i-view-logic-param';

/**
 * 视图逻辑辅助类
 */
export interface IViewLogicHelper {
	/**
	 * 执行视图逻辑
	 *
	 * @param context 应用上下文
	 * @param viewParams 视图参数
	 * @param data 业务数据
	 * @param event 事件对象
	 * @param inputParams 视图逻辑必须参数
	 * @param ability 当前环境能力
	 */
	executeViewLogic<T extends IAbility>(
		context: IContext,
		viewParams: IParam,
		data: IParam[],
		event: MouseEvent,
		ability: T,
		inputParams: IViewLogicInput
	): Promise<IActionResult>;
}
